<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!-- saved from url=(0031)http://127.0.0.1/wenda/?/admin/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="blank">
    <meta name="format-detection" content="telephone=no">
    <title>概述 -学并思问答</title>
    <!--<base href="http://127.0.0.1/wenda/?/">--><base href=".">
    <link rel="stylesheet" type="text/css" href="/tp/Public/admin/css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="/tp/Public/admin/css/icon.css" />
    <!--<link type="text/css" rel="stylesheet" href="./css/bootstrap.css">-->
    <!--<link type="text/css" rel="stylesheet" href="./css/icon.css">-->
    <script type="text/javascript">
        var G_INDEX_SCRIPT = "?/";
        var G_BASE_URL = "http://127.0.0.1/wenda/?";
        var G_STATIC_URL = "http://127.0.0.1/wenda/static";
        var G_UPLOAD_URL = "http://127.0.0.1/wenda/uploads";
        var G_USER_ID = "1";
        var G_POST_HASH = "";
    </script>
    <link rel="stylesheet" type="text/css" href="/tp/Public/admin/css/common.css" />
    <!--<link type="text/css" rel="stylesheet" href="./css/common.css">-->
    <script type="text/javascript" src="/tp/Public/admin/js/jquery-2.js"></script>
    <script type="text/javascript" src="/tp/Public/admin/js/aws_admin.js"></script>
    <!--<script type="text/javascript" src="/tp/Public/admin/js/aws_admin_template.js"></script>-->
    <script type="text/javascript" src="/tp/Public/admin/js/aws_admin_template.js"></script>
    <script type="text/javascript" src="/tp/Public/admin/js/jquery-form.js"></script>
    <script type="text/javascript" src="/tp/Public/admin/js/framework.js"></script>
    <script type="text/javascript" src="/tp/Public/admin/js/global.js"></script>
    <script type="text/javascript" src="/tp/Public/admin/js/respond.js"></script>
    <!--<script type="text/javascript" src="./js/jquery.2.js"></script>-->
    <!--<script type="text/javascript" src="./js/aws_admin.js"></script>-->
    <!--<script type="text/javascript" src="./js/aws_admin_template.js"></script>-->
    <!--<script type="text/javascript" src="./js/jquery.form.js"></script>-->
    <!--<script type="text/javascript" src="./js/framework.js"></script>-->
    <!--<script type="text/javascript" src="./js/global.js"></script>-->
    <!--[if lte IE 8]>
    <!--<script type="text/javascript" src="http://127.0.0.1/wenda/static/js/respond.js"></script>-->
    <![endif]-->
</head>

<body>
<div class="aw-header">
    <button class="btn btn-sm mod-head-btn pull-left">
        <i class="icon icon-bar"></i>
    </button>

    <div class="mod-header-user">
        <ul class="pull-right">

            <li class="dropdown">
                <a href="http://127.0.0.1/wenda/?/#" class="dropdown-toggle mod-bell" data-toggle="dropdown">
                    <i class="icon icon-bell"></i>
                </a>
                <ul class="dropdown-menu mod-chat">
                    <p>没有通知</p>
                </ul>
            </li>

            <li class="dropdown username">
                <a href="" class="dropdown-toggle" data-toggle="dropdown">
                    <img src="/tp<?php echo ($_SESSION['admin_avatarulr']); ?>" class="img-circle" width="30">
                    <?php echo ($_SESSION['admin_user_name']); ?>                    <span class="caret"></span>
                </a>

                <ul class="dropdown-menu pull-right mod-user">
                    <li>
                        <a href="http://127.0.0.1/wenda" target="_blank"><i class="icon icon-home"></i>首页</a>
                    </li>

                    <li>
                        <a href="./images/index.html"><i class="icon icon-ul"></i>概述</a>
                    </li>

                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/logout/"><i class="icon icon-logout"></i>退出</a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
</div>
<div class="aw-side ps-container" id="aw-side">
    <div class="mod">
        <div class="mod-logo">
            <img class="pull-left" src="/tp/Public/images/logo.png" alt="">
            <h1>WeCenter</h1>
        </div>
        <div class="mod-message">
            <div class="message">
                <a class="btn btn-sm" href="http://127.0.0.1/wenda" target="_blank" title="首页">
                    <i class="icon icon-home"></i>
                </a>

                <a class="btn btn-sm" href="./images/index.html" title="概述">
                    <i class="icon icon-ul"></i>
                </a>

                <a class="btn btn-sm" href="http://127.0.0.1/wenda/?/admin/logout/" title="退出">
                    <i class="icon icon-logout"></i>
                </a>
            </div>
        </div>
        <ul class="mod-bar">
            <input type="hidden" id="hide_values" val="0">
            <li>
                <?php if($pd == 概述): ?><a href="<?php echo U('/Admin/index');?>" class=" icon icon-home active">
                    <span>概述</span>
                </a>
                    <?php else: ?>
                    <a href="<?php echo U('/Admin/index');?>" class=" icon icon-home">
                        <span>概述</span>
                    </a><?php endif; ?>
            </li>
            <li>
                <?php if($pd == 全局设置): ?><a href="javascript:;" class=" icon icon-setting active" data="icon">
                    <span>全局设置</span>
                </a>
                <?php else: ?>
                    <a href="javascript:;" class=" icon icon-setting" data="icon">
                        <span>全局设置</span>
                    </a><?php endif; ?>
                <ul class="hide">
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/settings/category-site">
                            <span>站点信息</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/settings/category-register">
                            <span>注册访问</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/settings/category-functions">
                            <span>站点功能</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/settings/category-contents">
                            <span>内容设置</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/settings/category-integral">
                            <span>威望积分</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/settings/category-permissions">
                            <span>用户权限</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/settings/category-mail">
                            <span>邮件设置</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/settings/category-openid">
                            <span>开放平台</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/settings/category-cache">
                            <span>性能优化</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/settings/category-interface">
                            <span>界面设置</span>
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;" class=" icon icon-reply" data="icon">
                    <span>内容管理</span>
                </a>

                <ul class="hide">
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/question/question_list/">
                            <span>问题管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/article/list/">
                            <span>文章管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/topic/list/">
                            <span>话题管理</span>
                        </a>
                    </li>
                </ul>
            </li>

            <li>
                <?php if($pd == 用户管理): ?><a href="javascript:;" class=" icon icon-user active" data="icon">
                    <span>用户管理</span>
                </a>
                <?php else: ?>
                    <a href="javascript:;" class=" icon icon-user" data="icon">
                        <span>用户管理</span>
                    </a><?php endif; ?>
                <?php if($pd == 用户管理): ?><ul class="hide"style="display: block" >
                    <?php else: ?>
                    <ul class="hide"><?php endif; ?>
                    <li>
                        <?php if($pt == 用户列表): ?><a href="<?php echo U('Admin/user/index');?>" class="active">
                            <span>用户列表</span>
                        </a>
                            <?php else: ?>
                            <a href="<?php echo U('Admin/user/index');?>">
                                <span>用户列表</span>
                            </a><?php endif; ?>
                    </li>
                    <li>
                        <?php if($pt == 用户组): ?><a href="<?php echo U('Admin/user/group_list');?>" class="active">
                                <span>用户组</span>
                            </a>
                            <?php else: ?>
                            <a href="<?php echo U('Admin/user/group_list');?>">
                                <span>用户组</span>
                            </a><?php endif; ?>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/user/invites/">
                            <span>批量邀请</span>
                        </a>
                    </li>
                    <li>
                        <?php if($pt == 职位设置): ?><a href="<?php echo U('Admin/User/job_list');?>" class="active">
                                <span>职位设置</span>
                            </a>
                            <?php else: ?>
                            <a href="<?php echo U('Admin/User/job_list');?>">
                                <span>职位设置</span>
                            </a><?php endif; ?>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;" class=" icon icon-report" data="icon">
                    <span>审核管理</span>
                </a>

                <ul class="hide">
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/approval/list/">
                            <span>内容审核</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/user/verify_approval_list/">
                            <span>认证审核</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/user/register_approval_list/">
                            <span>注册审核</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/question/report_list/">
                            <span>用户举报</span>
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <?php if($pd == 内容设置): ?><a href="javascript:;" class=" icon icon-signup active" data="icon">
                        <span>内容设置</span>
                    </a>
                    <ul class="hide" style="display:block;">
                    <?php else: ?>
                    <a href="javascript:;" class=" icon icon-signup" data="icon">
                        <span>内容设置</span>
                    </a>
                        <ul class="hide"><?php endif; ?>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/nav_menu/">
                            <span>导航设置</span>
                        </a>
                    </li>
                    <li>
                        <?php if($pt == 分类管理): ?><a href="<?php echo U('Admin/Problem/problemclass');?>" class="active">
                                <span>分类管理</span>
                            </a>
                            <?php else: ?>
                            <a href="<?php echo U('Admin/Problem/problemclass');?>">
                                <span>分类管理</span>
                            </a><?php endif; ?>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/feature/list/">
                            <span>专题管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/page/">
                            <span>页面管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/help/list/">
                            <span>帮助中心</span>
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;" class=" icon icon-share" data="icon">
                    <span>微信微博</span>
                </a>

                <ul class="hide">
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/weixin/accounts/">
                            <span>微信多账号管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/weixin/mp_menu/">
                            <span>微信菜单管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/weixin/reply/">
                            <span>微信自定义回复</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/weixin/third_party_access/">
                            <span>微信第三方接入</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/weixin/qr_code/">
                            <span>微信二维码管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/weixin/sent_msgs_list/">
                            <span>微信消息群发</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/weibo/msg/">
                            <span>微博消息接收</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/edm/receiving_list/">
                            <span>邮件导入</span>
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;" class=" icon icon-inbox" data="icon">
                    <span>邮件群发</span>
                </a>

                <ul class="hide">
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/edm/tasks/">
                            <span>任务管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/edm/groups/">
                            <span>用户群管理</span>
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;" class=" icon icon-job" data="icon">
                    <span>工具</span>
                </a>

                <ul class="hide">
                    <li>
                        <a href="http://127.0.0.1/wenda/?/admin/tools/">
                            <span>系统维护</span>
                        </a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <div class="ps-scrollbar-x-rail" style="width: 235px; display: none; left: 0px; bottom: 3px;"><div class="ps-scrollbar-x" style="left: 0px; width: 0px;"></div></div><div class="ps-scrollbar-y-rail" style="top: 0px; height: 592px; display: inherit; right: 0px;"><div class="ps-scrollbar-y" style="top: 0px; height: 545px;"></div></div></div>


<div class="aw-content-wrap">
	<div class="mod">
		<div class="mod-head">
			<h3>
				<ul class="nav nav-tabs">
					<li class="active"><a href="http://127.0.0.1/wenda/?/#_members" data-toggle="tab" id="members">会员组</a></li>
					<li class=""><a href="http://127.0.0.1/wenda/?/#_system" data-toggle="tab" id="system">系统组</a></li>
					<li class=""><a href="http://127.0.0.1/wenda/?/#_custom" data-toggle="tab" id="custom">特殊组</a></li>
									</ul>
			</h3>
		</div>
		<div class="mod-body tab-content">
			<div class="tab-pane active" id="_members">
				<div class="table-responsive">
					<form id="batchs_form" action="http://127.0.0.1/wenda/?/admin/ajax/save_user_group/" method="post" onsubmit="return false;">
						<table class="table table-striped" id="members_table">
							<thead>
								<tr>
									<th><div class="icheckbox_square-blue" style="position: relative;"><input type="checkbox" class="check-all" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div></th>
									<th>ID</th>
									<th>会员组名称</th>
									<th>威望介于</th>
									<th>威望系数</th>
								</tr>
							</thead>
							<tbody>
																<tr>
									<td><div class="icheckbox_square-blue" style="position: relative;"><input type="checkbox" value="5" name="group_ids[]" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div></td>
									<td>5</td>
									<td>
										<input class="form-control" type="text" name="group[5][group_name]" value="注册会员">
									</td>
									<td class="form-inline">
										<div class="form-group">
											<input type="text" name="group[5][reputation_lower]" value="0" class="form-control control-value">
											~
											<input type="text" name="group[5][reputation_higer]" class="form-control max-value" value="100">
										</div>
									</td>
									<td><input type="text" name="group[5][reputation_factor]" class="form-control" value="1"></td>
									<td><a href="http://127.0.0.1/wenda/?/admin/user/group_edit/group_id-5" title="" class="icon icon-edit md-tip" data-original-title="权限编辑"></a></td>
								</tr>
																<tr>
									<td><div class="icheckbox_square-blue" style="position: relative;"><input type="checkbox" value="6" name="group_ids[]" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div></td>
									<td>6</td>
									<td>
										<input class="form-control" type="text" name="group[6][group_name]" value="初级会员">
									</td>
									<td class="form-inline">
										<div class="form-group"><select class="form-control min-value" name="group[6][reputation_lower]"><option value="100">100</option><option value="200">200</option><option value="500">500</option><option value="1000">1000</option><option value="999999">999999</option></select>
											
											~
											<input type="text" name="group[6][reputation_higer]" class="form-control max-value" value="200">
										</div>
									</td>
									<td><input type="text" name="group[6][reputation_factor]" class="form-control" value="1"></td>
									<td><a href="http://127.0.0.1/wenda/?/admin/user/group_edit/group_id-6" title="" class="icon icon-edit md-tip" data-original-title="权限编辑"></a></td>
								</tr>
																<tr>
									<td><div class="icheckbox_square-blue" style="position: relative;"><input type="checkbox" value="7" name="group_ids[]" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div></td>
									<td>7</td>
									<td>
										<input class="form-control" type="text" name="group[7][group_name]" value="中级会员">
									</td>
									<td class="form-inline">
										<div class="form-group"><select class="form-control min-value" name="group[7][reputation_lower]"><option value="100">100</option><option value="200">200</option><option value="500">500</option><option value="1000">1000</option><option value="999999">999999</option></select>
											
											~
											<input type="text" name="group[7][reputation_higer]" class="form-control max-value" value="500">
										</div>
									</td>
									<td><input type="text" name="group[7][reputation_factor]" class="form-control" value="1"></td>
									<td><a href="http://127.0.0.1/wenda/?/admin/user/group_edit/group_id-7" title="" class="icon icon-edit md-tip" data-original-title="权限编辑"></a></td>
								</tr>
																<tr>
									<td><div class="icheckbox_square-blue" style="position: relative;"><input type="checkbox" value="8" name="group_ids[]" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div></td>
									<td>8</td>
									<td>
										<input class="form-control" type="text" name="group[8][group_name]" value="高级会员">
									</td>
									<td class="form-inline">
										<div class="form-group"><select class="form-control min-value" name="group[8][reputation_lower]"><option value="100">100</option><option value="200">200</option><option value="500">500</option><option value="1000">1000</option><option value="999999">999999</option></select>
											
											~
											<input type="text" name="group[8][reputation_higer]" class="form-control max-value" value="1000">
										</div>
									</td>
									<td><input type="text" name="group[8][reputation_factor]" class="form-control" value="1"></td>
									<td><a href="http://127.0.0.1/wenda/?/admin/user/group_edit/group_id-8" title="" class="icon icon-edit md-tip" data-original-title="权限编辑"></a></td>
								</tr>
																<tr>
									<td><div class="icheckbox_square-blue" style="position: relative;"><input type="checkbox" value="9" name="group_ids[]" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div></td>
									<td>9</td>
									<td>
										<input class="form-control" type="text" name="group[9][group_name]" value="核心会员">
									</td>
									<td class="form-inline">
										<div class="form-group"><select class="form-control min-value" name="group[9][reputation_lower]"><option value="100">100</option><option value="200">200</option><option value="500">500</option><option value="1000">1000</option><option value="999999">999999</option></select>
											
											~
											<input type="text" name="group[9][reputation_higer]" class="form-control max-value" value="999999">
										</div>
									</td>
									<td><input type="text" name="group[9][reputation_factor]" class="form-control" value="1"></td>
									<td><a href="http://127.0.0.1/wenda/?/admin/user/group_edit/group_id-9" title="" class="icon icon-edit md-tip" data-original-title="权限编辑"></a></td>
								</tr>
																<tr id="members_add_form" class="hide">
									<td></td>
									<td></td>
									<td>
										<input type="text" class="form-control" name="group_new[group_name][]" placeholder="用户组名称">
									</td>
									<td class="form-inline">
										<div class="form-group">
											<input class="new_input" type="text" name="group_new[reputation_lower][]">
											~ <input type="text" class="input-small max-value form-control" name="group_new[reputation_higer][]">
										</div>
									</td>
									<td><input type="text" class="input-small form-control" name="group_new[reputation_factor][]"></td>
									<td></td>
								</tr>
							</tbody>
						</table>
						<div class="mod-table-foot">
							<a class="btn btn-primary add">新增</a>
							<a class="btn btn-primary" onclick="AWS.ajax_post($(&#39;#batchs_form&#39;));">保存</a>
							<a class="btn btn-danger" onclick="AWS.ajax_post($(&#39;#batchs_form&#39;));">删除</a>
						</div>
					</form>
				</div>
			</div>

			<div class="tab-pane" id="_system">
				<table class="table table-striped">
					<thead>
						<tr>
							<th>ID</th>
							<th>系统组名称</th>
							<th></th>
						</tr>
					</thead>
					<tbody>
												<tr>
							<td>1</td>
							<td>超级管理员</td>
							<td><a href="http://127.0.0.1/wenda/?/admin/user/group_edit/group_id-1" title="" class="icon icon-edit md-tip" data-original-title="权限编辑"></a></td>
						</tr>
												<tr>
							<td>2</td>
							<td>前台管理员</td>
							<td><a href="http://127.0.0.1/wenda/?/admin/user/group_edit/group_id-2" title="" class="icon icon-edit md-tip" data-original-title="权限编辑"></a></td>
						</tr>
												<tr>
							<td>3</td>
							<td>未验证会员</td>
							<td><a href="http://127.0.0.1/wenda/?/admin/user/group_edit/group_id-3" title="" class="icon icon-edit md-tip" data-original-title="权限编辑"></a></td>
						</tr>
												<tr>
							<td>4</td>
							<td>普通会员</td>
							<td><a href="http://127.0.0.1/wenda/?/admin/user/group_edit/group_id-4" title="" class="icon icon-edit md-tip" data-original-title="权限编辑"></a></td>
						</tr>
												<tr>
							<td>99</td>
							<td>游客</td>
							<td><a href="http://127.0.0.1/wenda/?/admin/user/group_edit/group_id-99" title="" class="icon icon-edit md-tip" data-original-title="权限编辑"></a></td>
						</tr>
											</tbody>
				</table>
			</div>

			<div class="tab-pane" id="_custom">
				<form method="post" action="http://127.0.0.1/wenda/?/admin/ajax/save_custom_user_group/" id="custom_form">
				<table class="table table-striped" id="custom_table">
					<thead>
						<tr>
							<th><div class="icheckbox_square-blue" style="position: relative;"><input type="checkbox" class="check-all" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div></th>
							<th>ID</th>
							<th>名称</th>
							<th></th>
						</tr>
					</thead>
					<tbody>
												<tr id="custom_add_form" class="hide">
							<td></td>
							<td></td>
							<td><input type="text" class="form-control" name="group_new[group_name][]" placeholder="用户组名称"></td>
							<td></td>
						</tr>
					</tbody>
				</table>
				</form>
				<div class="mod-table-foot">
					<a class="btn btn-primary" onclick="$(&#39;#custom_table&#39;).append(&#39;&lt;tr&gt;&#39; + $(&#39;#custom_add_form&#39;).html() + &#39;&lt;/tr&gt;&#39;)">新增</a>
					<a class="btn btn-primary" onclick="AWS.ajax_post($(&#39;#custom_form&#39;));">保存</a>
					<a class="btn btn-danger" onclick="AWS.ajax_post($(&#39;#custom_form&#39;));">删除</a>
				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
	$(document).ready(function () {

		// 遍历生成select的option
		var select_arr = get_select_arr(), input_arr = [], template = get_select_template(select_arr);

		// 替换原来的input为select
		$.each($('#members_table .control-value'), function (i, e)
		{
			if (i > 0)
			{
				$(this).parents('.form-group').prepend('<select class="form-control min-value" name="' + $(this).attr('name') + '">' + template + '</select>');
				if ($.inArray($(this).val(), select_arr) != -1)
				{
					var val = $(this).parents('.form-group').find('option').eq($.inArray($(this).val(), select_arr)).val();
					$(this).parents('.form-group').find('select').val(val);
				}
				$(this).detach();
			}
		});

		var _index = $('#members_table .max-value').length - 1;
		$('#members_table .max-value:lt(' + _index + ')').change(function()
		{
			var select_arr = get_select_arr(), input_arr = [], template = get_select_template(select_arr);
			$.each($('#members_table select'), function (i, e)
			{
				input_arr.push($(this).val());
			});
			$('#members_table select').html(template);
			$.each($('#members_table select'), function (i, e)
			{
				$(this).val(input_arr[i]);
			});
		});

		//新加用户组
		$('.add').click(function()
		{
			$('#members_table').append('<tr class="new">' + $('#members_add_form').html() + '</tr>');

			if ($('#members_table tbody tr').length != 2)
			{
				var select_arr = get_select_arr(), template = get_select_template(select_arr);
					$('#members_table .new_input').parents('.form-group').prepend('<select class="form-control min-value" name="group_new[reputation_lower][]"></select>');
					$('#members_table .new_input').detach();
					$('#members_table select').last().append(template);
			}
		});

		function get_select_arr ()
		{
			var arr = [];
			$.each($('#members_table .max-value'), function (i, e)
			{
				if ($('#members_table .max-value').length == 1 || i != $('#members_table .max-value').length - 1)
				{
					if ($(this).val() != '')
					{
						arr.push($(this).val());
					}
				}

			});
			return arr;
		}

		function get_select_template (arr)
		{
			var template = '';
			$.each(arr, function (i, e)
			{
				template = template +  '<option value="' + e + '">' + e + '</option>';
			});
			return template
		}
	});
</script>

<div class="aw-footer">
    <p>Copyright © 2016 - Powered By <a href="http://www.wecenter.com/?copyright" target="blank">WeCenter 3.1.7</a></p>
</div>

<!-- DO NOT REMOVE -->
<div id="aw-ajax-box" class="aw-ajax-box"></div>


<div style="display:none;" id="__crond"><img src="./images/saved_resource" width="1" height="1"></div>

<!-- Escape time: 0.11494302749634 --><!-- / DO NOT REMOVE -->



</body></html>